import 'dart:math';
import 'Util.dart';
import 'package:flutter/material.dart';

class Header1 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Card(
      child: Container(
        color: Colors.white,
        height: 95,
        padding: EdgeInsets.all(5),
        child: rowLine,
      ),
    );
  }
}

var bigStyle =
    TextStyle(color: Colors.black, fontSize: 20, fontWeight: FontWeight.bold);

var btnStyle = TextStyle(color: Color(0xffffffff), fontSize: 13);

var headImg = Image.asset(
  "images/ic_pay_zhifubao.png",
  width: 50,
  height: 50,
);

var center = Column(
  mainAxisAlignment: MainAxisAlignment.center,
  crossAxisAlignment: CrossAxisAlignment.start,
  children: <Widget>[
    Text(
      "醉卧沙场君莫笑",
      style: bigStyle,
    ),
    Row(
      children: <Widget>[
        Icon(
          Icons.next_week,
          size: 15,
        ),
        Util().pd(Text("古来征战几人回"), l: 5)
      ],
    ),
    Row(
      children: <Widget>[
        Icon(
          Icons.keyboard,
          size: 15,
        ),
        Util().pd(
            Text(
              "葡萄美酒夜光杯，欲饮琵琶马上催",
              overflow: TextOverflow.ellipsis,
              maxLines: 1,
            ),
            l: 5)
      ],
    )
  ],
);

var end = Column(
  mainAxisAlignment: MainAxisAlignment.spaceBetween,
  crossAxisAlignment: CrossAxisAlignment.end,
  children: <Widget>[
    Row(
      children: <Widget>[
        Icon(
          Icons.access_alarm,
          size: 15,
        ),
        Icon(
          Icons.access_time,
          size: 15,
        ),
        Icon(
          Icons.account_balance_wallet,
          size: 15,
        ),
      ],
    ),
    Util().bg(
        Util().pdhv(
            Text(
              "那啥",
              style: btnStyle,
            ),
            h: 10,
            v: 3),
        Colors.blueAccent)
  ],
);

var rowLine = Row(
  children: <Widget>[
    Util().pda(headImg, 5),
    Expanded(
      child: Util().pda(center, 5),
    ),
    Util().pda(end, 10)
  ],
);
